﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace vorkos_dev_snake
{
    public class Food
    {
        public void GenerateFood(Snake snakePersonage)
        {
            Random R = new Random();
            Coordinate dimentions = GameLogic.Instance.UI.GetDimmentions();
            Coordinate tempFood = new Coordinate() { X = 5, Y = 5 };
            tempFood.X += (ushort)R.Next(2, dimentions.X - 7);
            tempFood.Y += (ushort)R.Next(2, dimentions.Y - 7);
            snakePersonage.CurrentField.AddFoodOnField(tempFood);
        }
    }
}
